WIP: feat(server): separate HTTPS from mTLS authentication#1351
Open
sjenning wants to merge 1 commit into
Open
WIP: feat(server): separate HTTPS from mTLS authentication#1351sjenning wants to merge 1 commit into
sjenning wants to merge 1 commit into
Conversation
Make --tls-client-ca optional and make client certificates always optional when a CA is configured. This decouples HTTPS encryption from mTLS authentication, allowing mTLS and OIDC bearer tokens to coexist as parallel authentication mechanisms. When --tls-client-ca is provided, client certificates are validated against the CA when presented but never required. Clients may connect with or without a certificate — authentication is handled at the application layer (e.g. OIDC). Two TLS modes are now supported: - HTTPS with optional mTLS (--tls-client-ca provided) - HTTPS-only (--tls-client-ca omitted) The --disable-gateway-auth flag is preserved for backward compatibility but is now a no-op. The allow_unauthenticated field has been removed from TlsConfig. The Helm chart conditionally includes the client-ca volume and env var based on whether clientCaSecretName is configured.
17b1e9c to
6793737
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--tls-client-caoptional when TLS is enabled, decoupling HTTPS encryption from mTLS client certificate authenticationRelated Issue
N/A
Changes
openshell-core/config.rs: ChangeTlsConfig.client_ca_pathfromPathBuftoOption<PathBuf>openshell-server/tls.rs: BranchTlsAcceptor::from_files—Some(ca)builds mTLS verifier,Noneuseswith_no_client_auth()openshell-server/cli.rs: Remove runtime error requiring--tls-client-ca; add HTTPS-only log message and no-auth warningopenshell-server/lib.rs: Passclient_ca_path.as_deref()tofrom_filesopenshell-server/compute/vm.rs: Wrap testclient_ca_pathvalues inSome()statefulset.yaml: Conditionally include client-ca env var, volume mount, and volumevalues.yaml: Document thatclientCaSecretNameis optionalTesting
mise run pre-commitpassesedge_tunnel_authintegration tests pass (including newhttps_only_no_client_cert_required)multiplex_tls_integrationtests pass--tls-certand--tls-keyonly, verify HTTPS-only mode works with OIDCChecklist
--tls-client-cawork identically)